package com.peng._05weibo.mapper;

import com.peng._05weibo.pojo.entity.Weibo;
import com.peng._05weibo.pojo.vo.WeiboDetailVO;
import com.peng._05weibo.pojo.vo.WeiboIndexVO;
import org.apache.ibatis.annotations.Insert;

import java.util.List;

/**
 * 微博Mapper
 * @Author peng
 * @Date 2024-04-23 11:37
 */
public interface WeiboMapper {
    @Insert("insert into weibo (content, created, user_id) " +
            "values (#{content}, #{created}, #{userId})")
    int insertWeibo(Weibo weibo);

    List<WeiboIndexVO> selectAllWeibo();

    WeiboDetailVO getWeiboDetailById(Long id);
}
